import {check} from '../utils/auth'
// 权限校验指令
function install(Vue, options={}){
  Vue.directive(options.name || 'auth',{
    inserted(el, binding){
      if(!check(binding.value)){
        el.parentNode && el.parentNode.removeChild(el);
      }
    }
  })
}

export default {install}